package com.hut.oa.model.dao.note;

import java.util.List;

import org.springframework.data.repository.CrudRepository;

import com.hut.oa.model.bean.NoteDir;
import com.hut.oa.model.bean.Notes;
import com.hut.oa.model.bean.User;

public interface NoteDao extends CrudRepository<Notes, Long>{

	List<Notes> findByUserIdAndIsDelete(User u,Integer isdelete);
	
	//查找不同分类下面的日记
	List<Notes> findByUserIdAndIsDeleteAndDir(User u,Integer isdelete,NoteDir dir);
	
	List<Notes> findByUserIdAndIsDeleteAndIsstar(User u,Integer isdelete,Integer isstar);
	
	List<Notes> findByIsDeleteAndPermission(Integer isdelete,String permission);
	
	
}
